#ifndef _OCORE_H
#define _OCORE_H
 
#include "o_struct.h"
#include "o_graphic_dx9.h"
#include "o_app_base.h"
#include "o_symbol.h"

#define O3_API O3_EXPORT_API

class Core {
public:
    bool init_core();
    void run_core();

public:
    Core(AppBase *pApp);
    virtual ~Core();

protected:
    bool init_os();
    bool init_graphic();

    void on_render();
    void on_update();

    static LRESULT CALLBACK on_wnd_msg(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
    LRESULT CALLBACK wnd_proc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);

    void toggle_window();
	 
private:
    AppBase         *p_app;
    Graphic         *p_graphic;

private:
    Core_Config     core_cfg;

public:
    Core_Config *GetCfg()
    { return &core_cfg; }
};

#endif
 